Communication apparatus and printer for performing wireless communication of image data representing image of print target

ABSTRACT

A communication apparatus may perform: communicating a wireless setting value with a printer via a first wireless communication interface, establishing the wireless connection with the printer via a second wireless communication interface using the wireless setting value; sending first image data representing a first image of a print target to the printer via the second wireless communication interface using the wireless connection; determining, after the first image data is sent to the printer, whether an apparatus-side disconnection condition is satisfied; disconnecting the wireless connection when it is determined that the apparatus-side disconnection condition is satisfied; and sending, when it is determined that the apparatus-side disconnection condition is not satisfied, second image data representing a second image of a print target to the printer via the second wireless communication interface using the wireless connection.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of prior U.S. application Ser. No.14/593,548, filed Jan. 9, 2015, which claims priority to Japanese PatentApplication No. 2014-002188, filed on Jan. 9, 2014, the contents ofwhich are hereby incorporated by reference into the present application.

TECHNICAL FIELD

The present specification discloses a technique for performing awireless communication of data between a communication apparatus and aprinter.

DESCRIPTION OF RELATED ART

A system is known comprising an initiator and a target, the initiatorbeing a data sending side wireless communication apparatus, and thetarget being a data receiving side wireless communication apparatus. Ifthe size of the data to be sent to the target is equal to or less than athreshold value, the initiator sends the data to the target using anNFC. On the other hand, if the size of the data to be sent to the targetis greater than the threshold value, the initiator hands over thecommunication scheme from NFC to Bluetooth (registered trademark), andsends the data to the target using a Bluetooth (registered trademark)wireless connection. After finishing sending the data, the initiatordisconnects the wireless connection.

SUMMARY

In the technique described above, after handing over the communicationscheme from NFC to Bluetooth (registered trademark) and finishing thesending of the data, the initiator invariably disconnects the wirelessconnection. However, a situation may exist in which the wirelessconnection should continue.

The present specification provides a technique allowing appropriateprocessing to be performed after a wireless communication interface hasbeen changed and communication of image data has been performed.

The present specification discloses a non-transitory computer-readablerecording medium storing computer-readable instructions for acommunication apparatus. The computer-readable instructions, whenexecuted by a processor of the communication apparatus, may cause thecommunication apparatus to perform: communicating a wireless settingvalue with a printer via a first wireless communication interface of thecommunication apparatus, the wireless setting value being forestablishing a wireless connection with the printer via a secondwireless communication interface of the communication apparatus, thesecond wireless communication interface being different from the firstwireless communication interface; establishing the wireless connectionwith the printer via the second wireless communication interface usingthe wireless setting value; sending first image data representing afirst image of a print target to the printer via the second wirelesscommunication interface using the wireless connection; determining,after the first image data is sent to the printer, whether anapparatus-side disconnection condition is satisfied, the apparatus-sidedisconnection condition being predetermined as a condition fordisconnecting the wireless connection; disconnecting the wirelessconnection when it is determined that the apparatus-side disconnectioncondition is satisfied; and sending, when it is determined that theapparatus-side disconnection condition is not satisfied, second imagedata representing a second image of a print target to the printer viathe second wireless communication interface using the wirelessconnection.

The present specification discloses a printer comprising: a firstwireless communication interface; a second wireless communicationinterface which is different from the first wireless communicationinterface; a print performing unit; a processor; and a memory storingcomputer-readable instructions therein. The computer-readableinstructions, when executed by the processor, may cause the printer toperform: communicating a wireless setting value with a communicationapparatus via the first wireless communication interface, the wirelesssetting value being for establishing a wireless connection with thecommunication apparatus via the second wireless communication interface;establishing the wireless connection with the communication apparatusvia the second wireless communication interface using the wirelesssetting value; receiving first image data from the communicationapparatus via the second wireless communication interface using thewireless connection; causing the print performing unit to perform aprint of a first image represented by the first image data; determining,after the first image data is received from the communication apparatus,whether an printer-side disconnection condition is satisfied, theprinter-side disconnection condition being predetermined as a conditionfor disconnecting the wireless connection; disconnecting the wirelessconnection when it is determined that the printer-side disconnectioncondition is satisfied; receiving, when it is determined that theprinter-side disconnection condition is not satisfied, second image datafrom the communication apparatus via the second wireless communicationinterface using the wireless connection; and causing the printperforming unit to perform a print of a second image represented by thesecond image data.

The above communication apparatus itself is also novel and useful.Moreover, a communication system comprising the communication apparatusand the printer is also novel and useful. Furthermore, a control methodfor implementation of the communication apparatus and/or the printer, isalso novel and useful. Furthermore, a non-transitory computer-readablerecording medium in which computer-readable instructions forimplementation of the printer are stored, is also novel and useful.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a configuration of a communication system;

FIG. 2 illustrates a flowchart of a process of a CPU of a printer of afirst embodiment;

FIG. 3 illustrates a flowchart of a process of a CPU of a portableterminal of the first embodiment;

FIG. 4 illustrates a sequence diagram of the first embodiment;

FIG. 5 illustrates a flowchart of a process of a CPU of a printer of asecond embodiment;

FIG. 6 illustrates a flowchart of a process of a CPU of a portableterminal of the second embodiment; and

FIG. 7 illustrates a sequence diagram of the second embodiment.

FIG. 8 illustrates a flowchart of a process of a CPU of a portableterminal of a modification;

FIG. 9 illustrates a flowchart of a process of a CPU of a portableterminal of a modification;

FIG. 10 illustrates a flowchart of a process of a CPU of a printer of amodification.

FIG. 11 illustrates a flowchart of a process of a CPU of a portableterminal of a modification;

FIG. 12 illustrates a flowchart of a process of a CPU of a printer of amodification.

EMBODIMENT First Embodiment

(Configuration of Communication System 2)

As illustrated in FIG. 1, a communication system 2 comprises a printer10 and a portable terminal 50. Each of the printer 10 and the portableterminal 50 can perform an NFC scheme wireless communication (i.e., NFCcommunication), this being a communication scheme of the NFC(abbreviation of Near Field Communication) standard and, further, canperform a Wi-Fi scheme wireless communication (i.e., Wi-Ficommunication), this being a communication scheme developed by Wi-FiAlliance.

(Configuration of Printer 10)

The printer 10 is a peripheral apparatus (i.e., peripheral apparatus ofa PC (abbreviation of Personal Computer) or the like) which can performa print function. The printer 10 comprises an operating unit 12, adisplay unit 14, a print performing unit 16, a wireless LAN(abbreviation of Local Area Network) interface 20, an NFC interface 22,and a controller 30. Hereinafter, the interface will be described as“I/F”.

The operating unit 12 comprises a plurality of keys. A user can inputvarious instructions to the printer 10 by operating the operating unit12. The display unit 14 is a display for displaying various pieces ofinformation. The print performing unit 16 is a printing mechanism suchas an ink jet printing or a laser printing method.

The wireless LAN I/F 20 is an interface for performing a Wi-Fi schemewireless communication. The Wi-Fi scheme, for example, is a wirelesscommunication scheme in accordance with the standard of 802.11 of IEEE(abbreviation of The Institute of Electrical and Electronics Engineers,Inc.) or a standard (e.g., 802.11a, 11b, 11g, 11n, etc.) equivalent tothis standard.

More specifically, the wireless LAN I/F 20 supports the WFD(abbreviation of Wi-Fi Direct) scheme developed by Wi-Fi Alliance.Consequently, the controller 30 can perform a Wi-Fi communication viathe wireless LAN I/F 20 using a WFD scheme wireless network (called“WFDNW” below). Details of the WFD scheme are described in “Wi-FiPeer-to-Peer (P2P) Technical Specification Version 1.1.” created by theWi-Fi Alliance. Further, details of the WFD scheme are disclosed in USPatent Application No. 2013/0260683, and are cited by reference to theliterature.

The NFC I/F 22 is an interface for performing an NFC scheme wirelesscommunication. The NFC scheme, for example, is a wireless communicationscheme in accordance with the international standard of, e.g., ISO/IEC21481 or ISO/IEC 18092. The NFC I/F 22 is an I/F called an NFC Forum Tag(NFC Forum Tag), and functions as an IC tag of the NFC standard. The NFCI/F 22 comprises a RAM, and can store information supplied from thecontroller 30. Moreover, in a modification, the NFC I/F 22 may be an I/Fcalled an NFC forum device capable of operating in at least one of P2Pmode, Reader/Writer mode, and CE mode.

The wireless LAN I/F 20 and the NFC I/F 22 are constituted by physicallydifferent chips. A communication speed of a wireless communication viathe wireless LAN I/F 20 (e.g., a maximum communication speed is 11 to600 Mbps) is faster than a communication speed of a wirelesscommunication via the NFC I/F 22 (e.g., a maximum communication speed is106 to 424 Kbps). A frequency of a carrier wave (e.g., a 2.4 GHz band, a5.0 GHz band) upon a wireless communication via the wireless LAN I/F 20is different from a frequency of a carrier wave (e.g. a 13.56 MHz band)upon a wireless communication via the NFC I/F 22. Further, a maximumdistance (e.g., 100 m) at which a wireless communication can beperformed via the wireless LAN I/F 20 is greater than a maximum distance(e.g., 10 cm) at which a wireless communication can be performed via theNFC I/F 22.

The controller 30 comprises a CPU 32 and a memory 34. The CPU 32 is aprocessor which performs various processes in accordance with a programstored in the memory 34. Moreover, in FIG. 1, the memory 34 furtherstores a user ID list. However, the user ID list is used in a secondembodiment, described below.

(Configuration of Portable Terminal 50)

The portable terminal 50 is a portable terminal device such as a mobiletelephone (e.g. a smartphone), a PDA, a notebook PC, a tablet PC, aportable music playback device or a portable movie playback device. Theportable terminal 50 comprises an operating unit 52, a display unit 54,a wireless LAN I/F 60, an NFC I/F 62 and a controller 70.

The operating unit 52 comprises a plurality of keys. The user can givevarious instructions to the portable terminal 50 by operating theoperating unit 52. The display unit 54 is a display for displayingvarious pieces of information. The wireless LAN I/F 60 and the NFC I/F62 are the same as the wireless LAN I/F 20 and the NFC I/F 22 of theprinter 10, respectively.

The controller 70 comprises a CPU 72 and a memory 74. The CPU 72 is aprocessor which performs various processes in accordance with a programstored in the memory 74. The program includes an OS (abbreviation ofOperation System) program, and a printer application. Below, theapplication is abbreviated to “appl.”.

The printer appl. is a program for causing the printer 10 to perform aprint function. The printer appl. may be installed to the portableterminal 50 from a server on the Internet or may be installed to theportable terminal 50 from a medium shipped together with the printer 10.

(WFD Scheme)

Next, the WFD scheme will be described. In the specification of WFD,three states are defined as the states of the WFD apparatus: Group Ownerstate (called “G/O state” below), client state (called “CL state” below)and device state. The WFD apparatus is selectively operable in one ofthe three states described above.

The G/O state WFD apparatus (i.e., G/O apparatus) is an apparatusforming a wireless network (i.e., WFDNW) in which the WFD apparatusoperates as a parent station. The CL state WFD apparatus (i.e., CLapparatus) is an apparatus operating as a child station of the WFDNW.The device state WFD apparatus (i.e., device apparatus) is an apparatusnot belonging to the WFDNW.

The WFDNW to which both the G/O apparatus and the CL apparatus belong isformed, for example, by either of the two procedures below. In the firstprocedure, a pair of device apparatuses performs a wirelesscommunication called a G/O negotiation. Thereby, it is determined thatone of the pair of device apparatuses will assume the G/O state (i.e.,G/O apparatus), and that the other will assume the CL state (i.e., CLapparatus). Then the G/O apparatus forms the WFDNW and establishes aconnection with the CL apparatus. Thereby, the WFDNW is formed to whichboth the G/O apparatus and the CL apparatus belong. In the secondprocedure, the device apparatus transits automatically to the G/O statewithout performing G/O negotiation, forming the WFDNW. In this case,after the WFDNW has been formed, the other device apparatus transits tothe CL state without performing G/O negotiation, establishing aconnection with the G/O apparatus. Thereby, the WFDNW is formed to whichboth the G/O apparatus and the CL apparatus belong.

The G/O apparatus is capable of performing a wireless communication oftarget data with the CL apparatus not via another apparatus. The targetdata is data that includes network layer information of the OSIreference model, and information of a layer higher than the networklayer (e.g., application layer), e.g., including image data representingan image of a print target. Further, the G/O apparatus is capable ofrelaying a wireless communication of target data between a pair of CLapparatuses. Thus, in the WFDNW, each apparatus can perform a wirelesscommunication of the target data not via an access point (called “AP”below) configured as a separate body from each apparatus. That is, theWFD scheme can be said to be a wireless communication scheme in which anAP is not used.

Further, the G/O apparatus cannot perform a wireless communication ofthe target data with a device apparatus which is not belonging to theWFDNW, but can perform a wireless communication of connection data witha device apparatus, and establish a connection with the deviceapparatus. Thereby, the G/O apparatus can cause the device apparatus toparticipate in the WFDNW.

The connection data is data including information of a layer lower thanthe network layer of the OSI reference model (e.g., physical layer, datalink layer) (i.e., data not including network layer information). Theconnection data includes, e.g. a Probe Request/Response signal,Provision Discovery Request/Response signal, AuthenticationRequest/Response signal, Association Request/Response signal, WSCExchange, 4-Way Handshake, etc. Moreover, below, Request and Responseare abbreviated to “Req.”, “Res.”, respectively.

The Probe Req. signal is a signal for searching for an apparatus (e.g.,G/O apparatus, AP) operating as a parent station of a wireless network,and the Probe Res. signal is a response signal thereto. The ProvisionDiscovery Req. signal is a signal for confirming the method of the WPS(abbreviation of Wi-Fi Protected Setup) (e.g., push button method, PINcode method, etc.), and the Provision Discovery Res. signal is aresponse signal thereto. The Authentication Req. signal is a signal forconfirming an authentication method, and the Authentication Res. signalis a response signal thereto. The Association Req. signal is a signalfor requesting a connection, and the Association Res. signal is aresponse signal thereto. The WSC Exchange is a signal for supplyingvarious kinds of information such as password, etc. The 4-Way Handshakeis a signal for performing authentication.

(Process Performed by CPU 32 of Printer 10; FIG. 2)

Next, the process performed by the CPU 32 of the printer 10 will bedescribed with reference to FIG. 2. When power of the printer 10 isturned ON, the printer 10 is in the device state of the WFD standardwithout being connected to any wireless network. When the power of theprinter 10 is turned ON, the CPU 32 stores a value indicating the devicestate in the memory 34 as the value indicating the state of the printer10 (called “WFD state value” below).

Further, when the power of the printer 10 is turned ON, the CPU 32creates a wireless setting value to be used in the WFDNW. The wirelesssetting value includes SSID (abbreviation of Service Set Identifier),BSSID (abbreviation of Basic Service Set Identifier), authenticationmethod, encryption method, and password. The SSID and BSSID areidentification information for identifying the WFDNW. More specifically,the SSID is a network identifier of the WFDNW, and the BSSID is a MACaddress of the printer 10. The authentication method, encryption method,and password are information for performing apparatus authentication,data encryption, etc. in the WFDNW.

The CPU 32 creates the SSID and password by randomly creating characterstrings. However, the BSSID, authentication method, and encryptionmethod are predetermined information, and not information created by theCPU 32. The CPU 32 stores the created wireless setting value in thememory 34, and further supplies the created wireless setting value tothe NFC I/F 22. Thereby, the wireless setting value is stored in the RAMin the NFC I/F 22.

In S10, the CPU 32 monitors whether a connection according to the NFCscheme (called “NFC connection” below) has been established between theNFC I/F 22 of the printer 10 and the NFC I/F 62 of the portable terminal50. The NFC I/F 22 of the printer 10 periodically sends a request signalto the exterior for establishing an NFC connection. Similarly, the NFCI/F 62 of the portable terminal 50 also periodically sends a requestsignal to the exterior. If the distance between the pair of NFC I/Fs 22,62 is equal to or less than a maximum distance allowing NFCcommunication (e.g., 10 cm), one of the NFC I/Fs receives a requestsignal from the other I/F, and sends a response signal to the other I/F.Thereby, an NFC connection between the pair of NFC I/Fs 22, 62 isestablished. The NFC I/F 22 of the printer 10 supplies information tothe controller 30 indicating that the NFC connection has beenestablished. As a result, the CPU 32 determines YES in S10, and proceedsto S12.

As described above, the wireless setting value is stored in advance inthe RAM of the NFC I/F 22 of the printer 10. When the aforementioned NFCconnection is established, the NFC I/F 62 of the portable terminal 50reads the wireless setting value from the NFC I/F 22 of the printer 10.That is, the CPU 72 of the portable terminal 50 receives the wirelesssetting value from the printer 10 via the NFC I/F 62. In other words,the CPU 32 of the printer 10 sends the wireless setting value to theportable terminal 50 via the NFC I/F 22 by storing, in advance, thewireless setting value in the RAM of the NFC I/F 22. Moreover, below,the wireless setting value sent to the portable terminal 50 from theprinter 10, and the SSID in that wireless setting value are called“target wireless setting value” and “target SSID”, respectively.

In S12, the CPU 32 causes the state of the printer 10 to transit to theG/O state spontaneously without performing G/O negotiation.Specifically, the CPU 32 changes the WFD state value in the memory 34from a value indicating the device state to a value indicating the G/Ostate. In the step of S12, the CPU 32 forms a WFDNW to which only theprinter 10, which is a G/O apparatus, belongs.

In S14, the CPU 32 monitors whether a Probe Req. signal including thetarget SSID has been received from the portable terminal 50 via thewireless LAN I/F 20. In case a Probe Req. signal including the targetSSID has been received, the CPU 32 determines YES in S14, and proceedsto S16. On the other hand, in case a Probe Req. signal including thetarget SSID has not been received even after a predetermined time haspassed since finishing S12, the CPU 32 determines NO in S14, skips S16to S32, and proceeds to S40.

In S16, the CPU 32 establishes a Wi-Fi connection with the portableterminal 50 via the wireless LAN I/F 20. Specifically, the CPU 32performs sending of the Probe Res. signal, receiving of theAuthentication Req. signal, sending of the Authentication Res. signal,etc. In the course of these communications, the CPU 32 performsauthentication and encryption in accordance with the authenticationmethod, encryption method, and password in the target wireless settingvalue. That is, the CPU 32 establishes a Wi-Fi connection with theportable terminal 50 using the target wireless setting value. As aresult, a Wi-Fi connection is established between the wireless LAN I/F20 of the printer 10 and the wireless LAN I/F 60 of the portableterminal 50. That is, the printer 10 causes the portable terminal 50 toparticipate as a CL apparatus in the WFDNW in which the printer 10 is aG/O apparatus. Thereby, a WFDNW is formed to which both the printer 10and the portable terminal 50 belong.

Moreover, in the state of the portable terminal 50 participating in theWFDNW, the CPU 32 periodically sends an existence confirmation signal tothe portable terminal 50 via the wireless LAN I/F 20. By monitoringwhether a response signal to the existence confirmation signal isreceived, the CPU 32 can monitor whether the portable terminal 50secedes from the WFDNW.

In S18, the CPU 32 receives image data from the portable terminal 50 viathe wireless LAN I/F 20 using the Wi-Fi connection (i.e., using theWFDNW). Image data has a comparatively large data size. Therefore, thecommunication speed of NFC communication is slower than thecommunication speed of WFD communication. Consequently, if aconfiguration is adopted in which a wireless communication of image databetween the printer 10 and the portable terminal 50 is performed usingan NFC communication, a long time for the wireless communication of theimage data is required. In contrast, in the present embodiment, theprinter 10 and the portable terminal 50 perform a wireless communicationof the image data using a Wi-Fi communication, and consequently thewireless communication of the image data can be performed rapidly.

Next, in S20, the CPU 32 supplies the image data to the print performingunit 16. Thereby, the print performing unit 16 prints an imagerepresented by the image data on a print medium. When the print of theimage is completed, the CPU 32 proceeds to S22.

In S22, the CPU 32 sends print completion notification to the portableterminal 50 via the wireless LAN I/F 20 using the Wi-Fi connection. Theprint completion notification is a command for notifying that printinghas been completed.

Next, the CPU 32 repeatedly executes the monitoring process of S30 andthe monitoring process of S32 until YES is determined in S30 or S32. InS30, the CPU 32 monitors whether image data (e.g., image data differentfrom the image data of S18) has been received from the portable terminal50 via the wireless LAN I/F 20. In case image data has been receivedfrom the portable terminal 50, the CPU 32 determines YES in S30, andagain executes S20 and S22.

Further, in S32 the CPU 32 monitors whether the portable terminal 50 hasseceded from the WFDNW. As described above, the CPU 32 periodicallysends an existence confirmation signal to the portable terminal 50 viathe wireless LAN I/F 20. Then, in case of not receiving a responsesignal to the existence confirmation signal from the portable terminal50, the CPU 32 determines that the portable terminal 50 has seceded fromthe WFDNW (YES in S32), and proceeds to S40.

In S40, the CPU 32 changes the state of the printer 10 from the G/Ostate to the device state. That is, the CPU 32 changes the WFD statevalue in the memory 34 from the value indicating the G/O state to avalue indicating the device state. Thereby, the WFDNW disappears.

Next, in S42, the CPU 32 creates a new wireless setting value, andstores the new wireless setting value in the memory 34 in place of theold wireless setting value. In S42, also, the CPU 32 creates an SSID andpassword by randomly creating character strings. Consequently, the SSIDand password created in S42 are usually different from the SSID andpassword created when the power is turned ON (or when S42 was performedin the past).

Next, in S44, the CPU 32 supplies the new wireless setting value to theNFC I/F 22. As a result, the new wireless setting value is stored inplace of the old wireless setting value in the RAM of the NFC I/F 22.When S44 ends, the process returns to S10.

(Process Performed by CPU 72 of Portable Terminal 50; FIG. 3)

Next, a process performed by the CPU 72 of the portable terminal 50 willbe described with reference to FIG. 3. In case an operation foractivating the printer appl. and a predetermined operation are performedon the operating unit 52, the CPU 72 starts the process of FIG. 3. Thepredetermined operation includes selecting image data in the memory 74of the portable terminal 50 (i.e., image data representing an image of aprint target).

In S50, the CPU 72 monitors whether an NFC connection has beenestablished (see S10 of FIG. 2). The NFC I/F 62 of the portable terminal50 supplies information indicating that an NFC connection has beenestablished to the controller 70. As a result, the CPU 72 determines YESin S50 and, in S52, receives a target wireless setting value from theprinter 10 via the NFC I/F 62. The CPU 72 stores the target wirelesssetting value in the memory 74.

Next, in S54, the CPU 72 sends a Probe Req. signal including the targetSSID to the printer 10 via the wireless LAN I/F 60 (see S14 of FIG. 2).Next, in S56, the CPU 72 establishes a Wi-Fi connection with the printer10 via the wireless LAN I/F 60 (see S16 of FIG. 2). Specifically, theCPU 72 performs receiving of the Probe Res. signal, sending of theAuthentication Req. signal, receiving of the Authentication Res. signal,etc. The CPU 72 performs authentication and encryption in accordancewith the authentication method, encryption method, and password in thetarget wireless setting value. That is, the CPU 72 establishes a Wi-Ficonnection with the printer 10 using the target wireless setting value.Thereby, the portable terminal 50 participates in the WFDNW as a CLapparatus.

In S58, the CPU 72 sends image data to the printer 10 via the wirelessLAN I/F 60 using the Wi-Fi connection (see S18 of FIG. 2). The imagedata is image data selected in the predetermined operation describedabove.

Next, in S70, the CPU 72 monitors whether a print completionnotification has been received from the printer 10 via the wireless LANI/F 60 using the Wi-Fi connection (see S22 of FIG. 2). In case ofreceiving the print completion notification, the CPU 72 determines YESin S70, and proceeds to S72.

In S72, the CPU 72 causes the display unit 54 to display a selectionscreen. The selection screen includes a button indicating “Continue”,and a button indicating “Disconnect” (see T60 of FIG. 3). The userselects the button indicating “Continue” in case of desiring to performadditional printing in accordance with image data different from theimage data already sent, and selects the button indicating “Disconnect”in case of not desiring to perform additional printing.

Next, in S74, the CPU 72 determines whether the button indicating“Continue” or the button indicating “Disconnect” has been selected. Incase of determining that the button indicating “Continue” has beenselected (YES in S74), the CPU 72 performs S58, S70, S72, S74 again.Moreover, in case of selecting the button indicating “Continue”, theuser further newly selects image data from within the memory 74. Then,in S58 which is performed again, the CPU 72 sends the newly selectedimage data to the printer 10. On the other hand, in case of determiningthat the button indicating “Disconnect” has been selected (NO in S74),the CPU 72 proceeds to S80.

In S80, the CPU 72 causes the portable terminal 50 to secede from theWFDNW (see YES in S32 of FIG. 2). In a state where the portable terminal50 is participating in the WFDNW, the CPU 72 sends a response signal tothe printer 10 in case of receiving an existence confirmation signalfrom the printer 10. In S80, the CPU 72 transits from a state of sendinga response signal to a state of not sending a response signal, therebyseceding from the WFDNW. Further, the CPU 72 deletes the target wirelesssetting value from the memory 74. When S80 is performed, the Wi-Ficonnection between the wireless LAN I/F 20 of the printer 10 and thewireless LAN I/F 60 of the portable terminal 50 is disconnected. Thatis, in S80, the CPU 72 causes the portable terminal 50 to secede fromthe WFDNW, disconnecting the Wi-Fi connection. When S80 ends, theprocess of FIG. 3 ends.

Moreover, in S80 described above, the CPU 72 causes the portableterminal 50 to secede from the WFDNW without sending, to the printer 10,a disconnect signal for disconnecting the Wi-Fi connection. Instead, ina modification, the CPU 72 may, e.g., cause the portable terminal 50 tosecede from the WFDNW by sending a disconnect signal for disconnectingthe Wi-Fi connection to the printer 10, thus disconnecting the Wi-Ficonnection.

(Specific Example; FIG. 4)

A specific example of the present embodiment will be described withreference to FIG. 4. The processes of FIG. 4 are realized by theflowcharts of FIG. 2 and FIG. 3. Moreover, in FIG. 4, the thin arrowindicates NFC communication, and the thick arrow indicates Wi-Ficommunication. Further, the broken line arrow does not indicate thecommunication of any data, but indicates that the Wi-Fi connection hasbeen disconnected.

In T10, the power is turned ON in the printer 10. In T12, the printer 10creates a wireless setting value WS1 (the process when power is ON ofFIG. 2).

In T20, the print appl. is activated in the portable terminal 50, andthe predetermined operation is performed (the trigger of the process ofFIG. 3). Then, the user of the portable terminal 50 brings the portableterminal 50 closer to the printer 10. Thereby, in T30, an NFC connectionis established between the printer 10 and the portable terminal 50 (YESin S10 of FIG. 2, YES in S50 of FIG. 3). Then, in T32, the wirelesssetting value WS1 is sent from the printer 10 to the portable terminal50 (S52 of FIG. 3).

In T40, the printer 10 transits from the device state to the G/O state,forming a WFDNW to which only the printer 10 is belonging (S12 of FIG.2). In T42, a Probe Req. signal is sent from the portable terminal 50 tothe printer 10 (YES in S14 of FIG. 2, S54 of FIG. 3). In T44, a Wi-Ficonnection is established between the printer 10 and the portableterminal 50 (S16 of FIG. 2, S56 of FIG. 3).

In T50, image data is sent from the portable terminal 50 to the printer10 (S18 of FIG. 2, S58 of FIG. 3). In T52, the printer 10 performsprinting of the image (S20 of FIG. 2). In T54, a print completionnotification is sent from the printer 10 to the portable terminal 50(S22 of FIG. 2, YES in S70 of FIG. 3).

In T60, the portable terminal 50 displays a selection screen (S72 ofFIG. 3). Then, the portable terminal 50 determines whether adisconnection condition is satisfied depending on the selection resultin the selection screen (S74 of FIG. 3). In the case where the buttonindicating “Disconnect” has been selected (NO in S74 of FIG. 3), theportable terminal 50 determines that the disconnection condition issatisfied, and proceeds to case A. On the other hand, in the case wherethe button indicating “Continue” has been selected (YES in S74 of FIG.3), the portable terminal 50 determines that the disconnection conditionis not satisfied, and proceeds to case B.

In case A, in T70, the portable terminal 50 secedes from the WFDNW (YESin S32 of FIG. 2, S80 of FIG. 3). Thereby, in T72, the Wi-Fi connectionbetween the printer 10 and the portable terminal 50 is disconnected. InT74, the printer 10 transits from the G/O state to the device state (S40of FIG. 2). Then, in T76, the printer 10 newly creates a wirelesssetting value WS2 (S42, S44 of FIG. 2).

In case B, in T80, image data is sent from the portable terminal 50 tothe printer 10 (YES in S30 of FIG. 2, S58 of FIG. 3). In T82, theprinter 10 performs printing of the image (S20 of FIG. 2). In T84, printcompletion notification is sent from the printer 10 to the portableterminal 50 (S22 of FIG. 2, YES in S70 of FIG. 3). Then, in T90, theportable terminal 50 displays the selection screen (S72 of FIG. 3). Theportable terminal 50 again determines whether the disconnectioncondition is satisfied depending on the selection result in theselection screen (S74 of FIG. 3). Then, depending on the determinationresult, case A or case B described above is performed again.

Effect of First Embodiment

According to the present embodiment, the portable terminal 50 receivesthe wireless setting value WS1 from the printer 10 via the NFC I/F 62(T32 of FIG. 4), and then a Wi-Fi connection with the printer 10 isestablished via the wireless LAN I/F 60 using the wireless setting valueWS1 (T42, T44). Then, the portable terminal 50 sends the image data tothe printer 10 via the wireless LAN I/F 60 using the Wi-Fi connection(T50). After having sent the image data in T50, the portable terminal 50displays the selection screen (T60). Then, depending on the selectionresult of the user, the portable terminal 50 determines whether thedisconnection condition is satisfied. That is, in case the selectionresult is “Disconnect”, the portable terminal 50 determines that thedisconnection condition is satisfied, and disconnects the Wi-Ficonnection (T70, T72). Thereby, the portable terminal 50 does not needto send a response signal to the existence confirmation signal. That is,it is possible to reduce the processing load of the portable terminal50. On the other hand, in case the selection result is “Continue”, theportable terminal 50 determines that the disconnection condition is notsatisfied, maintains the Wi-Fi connection, and sends the image data tothe printer 10 via the wireless LAN I/F 60 using the Wi-Fi connection(T80).

As described above, according to the present embodiment, after changingthe I/F for wireless communication from the NFC I/F 62 to the wirelessLAN I/F 60 and sending the image data in T50, the portable terminal 50can perform appropriate processes depending on whether or not thedisconnection condition is satisfied (i.e., depending on the intentionof the user).

(Correspondence Relationship)

The portable terminal 50 is an example of “communication apparatus”. TheNFC I/F 62 and the wireless LAN I/F 60 are examples of “communicationapparatus”, “first wireless communication interface”, and “secondwireless communication interface”, respectively. The Wi-Fi connection isan example of “wireless connection”. The image data of T50, and theimage data of T80 of FIG. 4 are examples of “first image data” and“second image data”, respectively. The print completion notification isan example of “predetermined notification”. Selection of “Disconnect” inthe selection screen of T60 is an example of “apparatus-sidedisconnection condition is satisfied”.

Second Embodiment

Points different from the first embodiment will be described. In thepresent embodiment, the memory 34 of the printer 10 stores a user IDlist in which one or more user IDs are written. The user ID isidentification information for identifying the user of the portableterminal 50, and is set in the printer appl. by the user at the time theprinter appl. is installed in the portable terminal 50. In other words,the user ID can also be said to be identification information foridentifying the portable terminal 50.

By operating the operating unit 12 of the printer 10, an administratorof the printer 10 can register, in the printer 10, the user ID set inthe portable terminal 50 (i.e., the user ID list). For example, if theuser of the portable terminal 50 is a user who frequently uses theprinter 10 (called “permanent user” below), the administrator registersthe user ID in the printer 10. Further, e.g., if the user of theportable terminal 50 is a user who temporarily uses the printer 10(called “temporary user” below), the administrator does not register theuser ID in the printer 10. Thereby, as described in detail later, incase the permanent user causes the printer 10 to perform a print, theprinter 10 does not proactively disconnect the Wi-Fi connection afterthe completion of printing (i.e., S22A of FIG. 5 described below isperformed due to YES in S21). As a result, the permanent user can causethe printer 10 to perform a print a plurality of times using the Wi-Ficonnection. On the other hand, in case the temporary user causes theprinter 10 to perform a print, the printer 10 proactively disconnectsthe Wi-Fi connection after the completion of printing (i.e., S40described below is performed due to NO in S21). As a result, it ispossible to reduce the processing load of the printer 10.

(Process Performed by CPU 32 of Printer 10; FIG. 5)

The CPU 32 of the printer 10 performs the process of FIG. 5 instead ofthe process of FIG. 2. In FIG. 5, the process of turning ON the powerand the process of S10 to S16 are the same as FIG. 2. S18A isapproximately the same as S18 of FIG. 2. However, in S18A, the CPU 32receives not only the image data but also the user ID set in the printerappl. of the portable terminal 50. S20 is the same as S20 of FIG. 2.

Next, in S21, the CPU 32 determines whether the user ID received in S18Ahas been registered in the user ID list in the memory 34. In case ofdetermining that the user ID has been registered in the user ID list(YES in S21), in S22A the CPU 32 sends an inquiry notification to theportable terminal 50 via the wireless LAN I/F 20 using the Wi-Ficonnection, and proceeds to 530A. The inquiry notification is anotification for causing the portable terminal 50 to display a selectionscreen and enquiring “Continue” and “Disconnect” to the user. 530A isapproximately the same as S30 of FIG. 2. However, in case of YES in530A, the CPU 32 receives not only the image data, but also the user ID.S32 is the same as S32 of FIG. 2.

Further, in case of determining that the user ID has not been registeredin the user ID list (NO in S21), the CPU 32 skips S22A to S32 andproceeds to S40. S40 to S44 are the same as S40 to S44 of FIG. 2.Moreover, in case of performing S40 due to NO in S21, in a state wherethe portable terminal 50 is participating in the WFDNW, the CPU 32 ofthe printer 10 causes the WFDNW to disappear. That is, the printer 10disconnects the Wi-Fi connection. In this case, due to no longerreceiving an existence confirmation signal from the printer 10, theportable terminal 50 can learn that the WFDNW has disappeared, i.e.,that the Wi-Fi connection has been disconnected. On the other hand, incase of performing S40 due to YES in S32, the portable terminal 50 isalready disengaged from the WFDNW. That is, the portable terminal 50results in disconnecting the Wi-Fi connection. Thus, in the presentembodiment, it is possible for the printer 10 to proactively disconnectthe Wi-Fi connection (the case of NO in S21), and it is possible for theportable terminal 50 to proactively disconnect the Wi-Fi connection (thecase of YES in S21, YES in S32).

(Process Performed by CPU 72 of Portable Terminal 50; FIG. 6)

The CPU 72 of the portable terminal 50 performs the process of FIG. 6instead of the process of FIG. 3. S50 to S56 are the same as S50 to S56of FIG. 3. S58A is approximately the same as S58 of FIG. 3. However, inS58A, the CPU 72 sends not only the image data, but also the user ID setin the printer appl. of the portable terminal 50 (see S18A of FIG. 5).

In 570A, the CPU 72 monitors whether an inquiry notification has beenreceived from the printer 10 via the wireless LAN I/F 60 using the Wi-Ficonnection (see S22A of FIG. 5). In case of receiving an inquirynotification from the printer 10, the CPU 72 determines YES in 570A, andproceeds to S72. S72 to S80 are the same as S72 to S80 of FIG. 3. On theother hand, in case an inquiry notification has not been received fromthe printer 10 even after a predetermined time has passed sincefinishing S58A (see NO in S21 of FIG. 5), the CPU 72 determines NO in570A, and proceeds to 570B. In 570B, the CPU 72 monitors whether theWFDNW has disappeared and, if the WFDNW has not disappeared (NO in570B), i.e., in case of receiving an existence confirmation signal fromthe printer 10, returns to 570A. On the other hand, if the WFDNW hasdisappeared (YES in 570B), i.e., if an existence confirmation signal hasnot been received from the printer 10 for a predetermined period, theCPU 72 skips S72 to S80, and ends the process of FIG. 6.

(Specific Example; FIG. 7)

Next, a specific example of the present embodiment will be describedwith reference to FIG. 7. The processes of FIG. 7 are realized by theflowcharts of FIG. 5 and FIG. 6. T10 to T52 are approximately the sameas T10 to T52 of FIG. 4. However, in T50A, the image data and the userID are sent from the portable terminal 50 to the printer 10 (518A ofFIG. 5, S58A of FIG. 6).

When the print of T52 is completed, the printer 10 determines whetherthe disconnection condition is satisfied depending on whether or not theuser ID of T50A has been registered in the user ID list (S21 of FIG. 5).In case the user ID has not been registered in the user ID list (NO inS21 of FIG. 5), the printer 10 determines that the disconnectioncondition is satisfied, and proceeds to case C. On the other hand, incase the user ID has been registered in the user ID list (YES in S21 ofFIG. 5), the printer 10 determines that the disconnection condition isnot satisfied, and proceeds to case D.

In case C, in T100, the printer 10 causes the WFDNW to disappear (S40 ofFIG. 5). Thereby, in T102, the Wi-Fi connection between the printer 10and the portable terminal 50 is disconnected. That is, the printer 10proactively disconnects the Wi-Fi connection. Then, in T104, the printer10 newly creates the wireless setting value WS2 (S42, S44 of FIG. 5).

In case D, in T110, an inquiry notification is sent from the printer 10to the portable terminal 50 (S22A of FIG. 5, YES in 570A of FIG. 6).Thereby, in T120, the portable terminal 50 displays the selection screen(S72 of FIG. 6). Then, depending on the selection result in theselection screen, the portable terminal 50 determines whether thedisconnection condition is satisfied (S74 of FIG. 6). In case the buttonindicating “Disconnect” is selected (NO in S74 of FIG. 6), the portableterminal 50 determines that the disconnection condition is satisfied,and proceeds to case D1. On the other hand, in case the buttonindicating “Continue” is selected (YES in S74 of FIG. 6), the portableterminal 50 determines that the disconnection condition is notsatisfied, and proceeds to case D2.

T130 to T136 of case D1 are the same as T70 to T76 of case A of FIG. 4.That is, in case D1, the portable terminal 50 proactively disconnectsthe Wi-Fi connection.

T140 to T150 of case D2 are approximately the same as T80 to T90 of caseB of FIG. 4. However, in T140, the image data and the user ID are sentfrom the portable terminal 50 to the printer 10 (YES in 530A of FIG. 5,S58A of FIG. 6). When the print of T142 is completed, the printer 10again determines whether or not the disconnection condition is satisfieddepending on whether or not the user ID of T140 has been registered inthe user ID list (S21 of FIG. 5). Further, in T144, an inquirynotification is sent from the printer 10 to the portable terminal 50(S22A of FIG. 5, YES in 570A of FIG. 6). The portable terminal 50 againdetermines whether or not the disconnection condition is satisfieddepending on the selection result in the selection screen of T150. Then,according to the determination result, case D1 or case D2 is performedagain.

Effect of Second Embodiment

As with the first embodiment, after changing the I/F for wirelesscommunication from the NFC I/F 62 to the wireless LAN I/F 60 and sendingthe image data in T50A of FIG. 7, the portable terminal 50 can performappropriate processes (see case D1 and D2 of FIG. 7) depending onwhether or not the disconnection condition is satisfied (i.e., dependingon the intention of the user).

Further, in the present embodiment, the printer 10 sends the wirelesssetting value WS1 to the portable terminal 50 via the NFC I/F 22 (T32 ofFIG. 7), and then establishes the Wi-Fi connection with the portableterminal 50 via the wireless LAN I/F 20 using the wireless setting valueWS1 (T42, T44). Then, the printer 10 receives image data from theportable terminal 50 via the wireless LAN I/F 20 using the Wi-Ficonnection (T50A). After receiving the image data of T50A, the printer10 determines whether the disconnection condition is satisfied bydetermining whether the user ID of T50A has been registered in the userID list. That is, if the user ID has not been registered in the user IDlist, the printer 10 determines that the disconnection condition issatisfied and disconnects the Wi-Fi connection (T100, T102). Thereby,the printer 10 does not need to send an existence confirmation signal tothe portable terminal 50. That is, it is possible to reduce theprocessing load of the printer 10. On the other hand, if the user ID hasbeen registered in the user ID list, the printer 10 determines that thedisconnection condition is not satisfied, maintains the Wi-Ficonnection, and receives image data from the portable terminal 50 viathe wireless LAN I/F 20 using the Wi-Fi connection (T140).

As described above, according to the present embodiment, after changingthe I/F for wireless communication from the NFC I/F 22 to the wirelessLAN I/F 20 and sending the image data of T50A, the printer 10 canperform appropriate processes depending on whether or not thedisconnection condition is satisfied (i.e., depending on whether or notthe user ID has been registered).

(Correspondence Relationship)

The NFC I/F 22 and the wireless LAN I/F 20 are examples of “firstwireless communication interface” and “second wireless communicationinterface” of “printer”, respectively. The image data of T50A and theimage data of T140 of FIG. 7 are examples of “first image data” and“second image data”, respectively. The inquiry notification is anexample of “predetermined notification”. The user ID not having beenregistered in the user ID list is an example of “printer-sidedisconnection condition is satisfied”.

(Modification 1)

In the first and second embodiments, the printer 10 spontaneouslytransits to the G/O state and forms the WFDNW (S12 of FIG. 2 and FIG.5), and the portable terminal 50 participates in the WFDNW as a CLapparatus (S54 and S56 of FIG. 3 and FIG. 6). Instead, (Modification1-1) or (Modification 1-2) below may be adopted.

(Modification 1-1)

In case the printer appl. is activated, the portable terminal 50spontaneously transits to the G/O state and forms the WFDNW. At thisjuncture, the portable terminal 50 creates a wireless setting value tobe used in the WFDNW. Then, in case an NFC connection is establishedbetween the printer 10 and the portable terminal 50, the portableterminal 50 sends the wireless setting value to the printer 10 using theNFC connection. In this configuration, also, the printer 10 and theportable terminal 50 can establish a Wi-Fi connection using the wirelesssetting value. That is, the printer 10 can participate as a CL apparatusin the WFDNW in which the portable terminal 50 is operating as a G/Oapparatus. That is, a communication apparatus may send a wirelesssetting value to a printer, and establish a wireless connection with theprinter in order to cause the printer to participate as a child stationin a wireless network in which the communication apparatus is a parentstation. Further, a printer may receive a wireless setting value from acommunication apparatus, and establish a wireless connection with thecommunication apparatus in order to cause the printer to participate asa child station in a wireless network in which the communicationapparatus is a parent station.

In (Modification 1-1) described above, in case of determining that thedisconnection condition is satisfied, the portable terminal 50 maydisconnect the Wi-Fi connection by causing the WFDNW to disappear.Further, in case of determining that the disconnection condition issatisfied, the printer 10 may cause the printer 10 to leave the WFDNW,thus disconnecting the Wi-Fi connection. That is, a communicationapparatus may disconnect a wireless connection by causing a wirelessnetwork to disappear if it is determined an apparatus-side disconnectioncondition is satisfied. Further, a printer may disconnect a wirelessconnection by causing the printer to secede from a wireless network ifit is determined a printer-side disconnection condition is satisfied.

(Modification 1-2)

The printer 10 and the portable terminal 50 may perform G/O negotiationof the WFD scheme. In this case, as a result of the negotiation, one ofthe printer 10 and the portable terminal 50 becomes the G/O apparatus,and the other becomes the CL apparatus. For example, in case the printer10 becomes the G/O apparatus, the wireless setting value is sent fromthe printer 10 to the portable terminal 50 by means of NFCcommunication, as in the first and second embodiments. Further, e.g., incase the portable terminal 50 becomes the G/O apparatus, the wirelesssetting value is sent from the portable terminal 50 to the printer 10 bymeans of NFC communication, as in (Modification 1-1) above. Generallyspeaking, the wireless network may be formed by one of the“communication apparatus” and the “printer” spontaneously becoming theparent station, or the wireless network may be formed by the“communication apparatus” and the “printer” performing negotiation.

(Modification 2)

In the first and second embodiments, the portable terminal 50 displaysthe selection screen (S72 of FIG. 3 and FIG. 6), and determines whetherthe disconnection condition is satisfied depending on the selectionresult of the user (S74 of FIG. 3 and FIG. 6). Instead, (Modification2-1) or (Modification 2-2) below may be adopted.

(Modification 2-1)

Information indicating “Continue” or “Disconnect” may be registered inadvance by the user in the memory 74 of the portable terminal 50. Inthis case, as shown in S74A of FIG. 8, the CPU 72 of the portableterminal 50 may determine whether the disconnection condition issatisfied depending on the information in the memory 74 withoutdisplaying the selection screen. The CPU 72 determines YES in S74A ifthe information indicating “Disconnect” is stored in the memory 74, andproceeds to S80. The CPU 72 determines NO in S74A if the informationindicating “Continue” is stored in the memory 74, and proceeds to S58.In the present modification, registering information indicating“Disconnect” in the memory 74 is an example of “apparatus-sidedisconnection condition is satisfied”. Further, the informationindicating “Disconnect” is an example of “predetermined information”.

(Modification 2-2)

In the second embodiment, in case of determining that the user ID hasbeen registered (YES in S21 of FIG. 5), the printer 10 may sendinformation indicating “Continue” to the portable terminal 50 withoutsending an inquiry notification to the portable terminal 50 and, in caseof determining that the user ID has not been registered (NO in S21 ofFIG. 5), may send information indicating “Disconnect” to the portableterminal 50. In this case, as shown in S74B of FIG. 9, the CPU 72 of theportable terminal 50 may determine whether the disconnection conditionis satisfied depending on the information received from the printer 10without displaying the selection screen. The CPU 72 determines YES inS74B if the information indicating “Disconnect” is received from theprinter 10, and proceeds to S80. The CPU 72 determines NO in S74B if theinformation indicating “Continue” is received from the printer 10, andproceeds to S58. In the present modification, receiving informationindicating “Disconnect” from the printer 10 is an example of“apparatus-side disconnection condition is satisfied”. Further, theinformation indicating “Disconnect”, the information indicating“Continue” are examples of “first information”, “second information”respectively.

As described above, in (Modification 2-1) and (Modification 2-2) above,the selection screen is not displayed. Consequently, the “communicationapparatus” need not comprise a “display controller”.

(Modification 3)

In the second embodiment, the printer 10 determines whether thedisconnection condition is satisfied depending on whether or not theuser ID has been registered in the user ID list (S21 of FIG. 5).Instead, (Modification 3-1) or (Modification 3-2) below may be adopted.

(Modification 3-1)

Instead of the user ID list, information indicating “Continue” or“Disconnect” may be registered in advance by the user in the memory 34of the printer 10. In this case, as shown in S21 of FIG. 10, the CPU 32of the printer 10 may determine whether the disconnection condition issatisfied depending on the information in the memory 34. The CPU 32determines NO in S21 if the information indicating “Disconnect” isstored in the memory 34, and proceeds to S40. The CPU 32 determines YESin S21 if the information indicating “Continue” is stored in the memory34, and proceeds to S22A. In the present modification, registering theinformation indicating “Disconnect” in the memory 34 is an example of“printer-side disconnection condition is satisfied”. Further, theinformation indicating “Disconnect” is an example of “predeterminedinformation”.

(Modification 3-2)

In S21 of FIG. 5, the printer 10 may determine that the disconnectioncondition is satisfied in the case where free space in the memory 34 isless than a predetermined value, and may determine that thedisconnection condition is not satisfied in the case where the freespace in the memory 34 is equal to or more than the predetermined value.According to this configuration, in the case where the free space in thememory 34 is less than the predetermined value, the printer 10 canincrease the free space in the memory 34 due to transiting from the G/Ostate to the device state (i.e., due to disconnecting the Wi-Ficonnection). In the present modification, the free space in the memory34 being less than the predetermined value is an example of“printer-side disconnection condition is satisfied”.

(Modification 4)

In the first and second embodiments, the portable terminal 50 performsthe determination of S74 of FIG. 3 and FIG. 6 each time of sending imagedata to the printer 10. Instead, as shown in FIG. 11, after sendingimage data of a first time to the printer 10 (S58), in case ofdetermining that the disconnection condition is not satisfied (YES inS74), the CPU72 of the portable terminal 50 may determine YES in S71,and continue to maintain the Wi-Fi connection without performing thedetermination of S74 after sending image data of a second time andsubsequent times to the printer 10. That is, the “communicationapparatus” need not again determine whether or not the apparatus-sidedisconnection condition is satisfied after second image data has beensent.

(Modification 5)

In the second embodiment, the printer 10 performs the determination ofS21 of FIG. 5 each time image data is received from the portableterminal 50. Instead, as shown in FIG. 12, after receiving image data ofa first time from the portable terminal 50 (518A), in case ofdetermining that the disconnection condition is not satisfied (YES inS21), the CPU32 of the printer 10 may determine YES in S21A, andcontinue to maintain the Wi-Fi connection after receiving image data ofa second time and subsequent times from the portable terminal 50 withoutperforming the determination of S21 until the portable terminal 50secedes from the WFDNW. That is, “printer” need not again determinewhether or not the printer-side disconnection condition is satisfiedafter the second image data has been received.

(Modification 6)

In the first embodiment, the print completion notification may not besent from the printer 10 to the portable terminal 50. In this case, inFIG. 3, after performing S58 the portable terminal 50 may perform S72without performing S70. That is, “communication apparatus” need notreceive the predetermined notification.

(Modification 7)

In FIG. 5 of the second embodiment, the printer 10 performs thedetermination of S21 after the print is completed (i.e., after endingS20). Instead, the printer 10 may perform the determination of S21before the print is completed. That is, “printer” may determine whetherthe printer-side disconnection condition is satisfied before the printof the first image is completed.

(Modification 8)

In S12 of FIG. 2 and FIG. 5, the printer 10 forms a wireless network bytransiting to the G/O state of the WFD standard. Instead, by activatinga so-called SoftAP, the printer 10 may form a wireless network in whichthe printer 10 operates as an AP. In the present modification, the APrealized by the SoftAP is an example of “parent station”.

(Modification 9)

“First wireless communication interface” is not limited to an I/F forperforming an NFC communication, but may be an I/F for performing, e.g.,a BlueTooth (registered trademark) communication, TransferJetcommunication, infrared communication, etc. Further, “second wirelessinterface” is not limited to an I/F for performing a Wi-Ficommunication, but may be an I/F for performing, e.g., a BlueTooth(registered trademark) communication.

(Modification 10)

“Communication apparatus” is not limited to the portable terminal 50,but may be a printer, scanner, copier, multi-function peripheral, PC,server, etc. Further, “printer” may further comprise not only a printfunction, but also a scan function, FAX function, telephone function,etc.

(Modification 11)

In the first and second embodiments, the processes of FIG. 2 to FIG. 7are realized by the CPU 32 of the printer 10 or the CPU 72 of theportable terminal 50 performing a program (i.e., software). Instead, atleast one of the processes of FIG. 2 to FIG. 7 may be realized byhardware such as a logic circuit.

The invention claimed is:
 1. A non-transitory computer-readablerecording medium storing computer-readable instructions for acommunication apparatus, the computer-readable instructions, whenexecuted by a processor of the communication apparatus, causing thecommunication apparatus to perform: communicating a wireless settingvalue with a printer via a first wireless communication interface of thecommunication apparatus; establishing a wireless connection with theprinter via a second wireless communication interface of thecommunication apparatus using the wireless setting value that has beencommunicated with the printer via the first wireless communicationinterface, the second wireless communication interface being differentfrom the first wireless communication interface; sending first imagedata representing a first image of a print target to the printer via thesecond wireless communication interface using the wireless connectionthat has been established using the wireless setting value that had beencommunicated with the printer via the first wireless communicationinterface; receiving, after the first image data is sent to the printervia the second wireless communication interface using the wirelessconnection that has been established using the wireless setting valuethat had been communicated with the printer via the first wirelesscommunication interface, a print completion notification from theprinter via the second wireless communication interface using thewireless connection that has been established using the wireless settingvalue that had been communicated with the printer via the first wirelesscommunication interface, the print completion notification indicatingthat a print of the first image is completed by the printer, and theprint completion notification being sent from the printer after theprint of the first image has been completed by the printer; controlling,after the first image data is sent to the printer via the secondwireless communication interface using the wireless connection that hasbeen established using the wireless setting value that had beencommunicated with the printer via the first wireless communicationinterface, a display unit of the communication apparatus to display aninstruction screen for receiving a user instruction as to whether thewireless connection via the second wireless communication interface isto be disconnected; and disconnecting the wireless connection withoutsending a disconnect signal for disconnecting the wireless connectionestablished between the communication apparatus and the printer from thecommunication apparatus to the printer in a case where the processordetermines that the print completion notification is received from theprinter and an instruction is received in the instruction screen thatthe wireless connection with the printer via the second wirelesscommunication interface is to be disconnected, the wireless connectionhas been established using the wireless setting value that had beencommunicated with the printer via the first wireless communicationinterface, the wireless connection being disconnected due to thecommunication apparatus transiting from a state of sending a responsesignal to an existence confirmation signal received from the printer toa state of not sending the response signal.
 2. The non-transitorycomputer-readable recording medium as in claim 1, wherein thecomputer-readable instructions, when executed by the processor, causethe communication apparatus to further perform: maintaining the wirelessconnection in a case where it is not instructed in the instructionscreen that the wireless connection is to be disconnected.
 3. Thenon-transitory computer-readable recording medium as in claim 1, whereinthe instruction screen is for prompting a user to instruct whether thewireless connection is to be disconnected, wherein the disconnectingincludes: disconnecting a wireless network, in a case where the userinstructs that the wireless connection is to be disconnected.
 4. Thenon-transitory computer-readable recording medium as in claim 1, whereinthe communicating includes receiving the wireless setting value from theprinter via the first wireless communication interface, and theestablishing includes establishing the wireless connection with theprinter in order to control the communication apparatus to participateas a child station in a wireless network in which the printer is aparent station.
 5. The non-transitory computer-readable recording mediumas in claim 1, wherein the establishing includes forming a wirelessnetwork to which the communication apparatus and the printer belong. 6.The non-transitory computer-readable recording medium as in claim 1,wherein the first wireless communication interface is an interface forperforming a wireless communication with an NFC (an abbreviation of NearField Communication) standard.
 7. A communication apparatus comprising:a first wireless communication interface; a second wirelesscommunication interface which is different from the first wirelesscommunication interface; a display unit; a processor; and a memorystoring computer-readable instructions therein, the computer-readableinstructions, when executed by the processor, causing the communicationapparatus to perform: communicating a wireless setting value with aprinter via the first wireless communication interface; establishing awireless connection with the printer via the second wirelesscommunication interface using the wireless setting value that has beencommunicated with the printer via the first wireless communicationinterface; sending first image data representing a first image of aprint target to the printer via the second wireless communicationinterface using the wireless connection that has been established usingthe wireless setting value that had been communicated with the printervia the first wireless communication interface; receiving, after thefirst image data is sent to the printer via the second wirelesscommunication interface using the wireless connection that has beenestablished using the wireless setting value that had been communicatedwith the printer via the first wireless communication interface, a printcompletion notification from the printer via the second wirelesscommunication interface using the wireless connection that has beenestablished using the wireless setting value that has been communicatedwith the printer via the first wireless communication interface, theprint completion notification indicating that a print of the first imageis completed by the printer, and the print completion notification beingsent from the printer after the print of the first image has beencompleted by the printer; controlling, after the first image data issent to the printer via the second wireless communication interfaceusing the wireless connection that has been established using thewireless setting value that had been communicated with the printer viathe first wireless communication interface, the display unit to displayan instruction screen for receiving a user instruction as to whether thewireless connection via the second wireless communication interface isto be disconnected; and disconnecting the wireless connection withoutsending a disconnect signal for disconnecting the wireless connectionestablished between the communication apparatus and the printer from thecommunication apparatus to the printer in a case where the processordetermines that the print completion notification is received from theprinter and an instruction is received in the instruction screen thatthe wireless connection with the printer via the second wirelesscommunication interface is to be disconnected, the wireless connectionhas been established using the wireless setting value that had beencommunicated with the printer via the first wireless communicationinterface, the wireless connection being disconnected due to thecommunication apparatus transiting from a state of sending a responsesignal to an existence confirmation signal received from the printer toa state of not sending the response signal.
 8. A printer comprising: afirst wireless communication interface; a second wireless communicationinterface which is different from the first wireless communicationinterface; a print performing unit; a processor; and a memory storingcomputer-readable instructions therein, wherein the first wirelesscommunication interface communicates a first wireless setting value witha communication apparatus, and the computer-readable instructions, whenexecuted by the processor, cause the printer to perform: establishing awireless connection with the communication apparatus via the secondwireless communication interface using the first wireless setting valuethat has been communicated with the communication apparatus via thefirst wireless communication interface; receiving first image data fromthe communication apparatus via the second wireless communicationinterface using the wireless connection that has been established usingthe first wireless setting value that had been communicated with thecommunication apparatus via the first wireless communication interface;controlling the print performing unit to perform a print of a firstimage represented by the first image data; and sending a printcompletion notification to the communication apparatus via the secondwireless communication interface using the wireless connection that hasbeen established using the first wireless setting value that had beencommunicated with the communication apparatus via the first wirelesscommunication interface after the print of the first image is completed,the print completion notification indicating that a print of the firstimage is completed, wherein the wireless connection is disconnectedwithout sending a disconnect signal for disconnecting the wirelessconnection established between the communication apparatus and theprinter from the communication apparatus to the printer in a case wherethe print completion notification is sent to the communication apparatusand an instruction is received in the communication apparatus that thewireless connection with the communication apparatus via the secondwireless communication interface is to be disconnected, the wirelessconnection has been established using the first wireless setting valuethat had been communicated with the communication apparatus via thefirst wireless communication interface, the wireless connection beingdisconnected due to the communication apparatus transiting from a stateof sending a response signal to an existence confirmation signalreceived from the printer to a state of not sending the response signal.9. The printer as in claim 8, wherein the wireless connection with thecommunication apparatus is maintained in a case where it is notinstructed in the communication apparatus that the wireless connectionis to be disconnected.
 10. The printer as in claim 8, wherein theestablishing includes forming a wireless network to which thecommunication apparatus and the printer belong.
 11. The printer as inclaim 8, wherein the first wireless communication interface isconfigured to send the first wireless setting value to the communicationapparatus, the establishing includes establishing the wirelessconnection with the communication apparatus in order to control thecommunication apparatus to participate as a child station in a wirelessnetwork in which the printer is a parent station.
 12. The printer as inclaim 8, wherein the first wireless communication interface is aninterface for performing a wireless communication with an NFC (anabbreviation of Near Field Communication) standard.